<p-messages [(value)]="msg"></p-messages>
<div class="content-section implementation GridDemo" id="MalfunctionAccept" >
  <div class="title col-sm-12">
    <div class="col-sm-1">
      <span>编辑接受故障单</span>
    </div>
    <div class="col-sm-11 pull-right">
      <button type="button"
              class="pull-right"
              pButton
              [routerLink]="['/index/maintenance/malfunctionBase']"
              icon="fa-close"
              style="width: 30px"></button>
    </div>
  </div>
  <form class="form-horizontal">
    <div class="form-group">
      <label class="col-sm-1 control-label">服务单号：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText  placeholder="自动生成"
               [(ngModel)]="malfNumber" readonly
               class=" form-control cursor_not_allowed"
               [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">来源：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText  placeholder="自动生成"
               [(ngModel)]="malSource" readonly
               class=" form-control cursor_not_allowed"
               [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">状态：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText placeholder="新建"
               [(ngModel)]="malStatus" readonly
               class=" form-control cursor_not_allowed"
               [ngModelOptions]="{standalone: true}"/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">报告人：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText  name="" placeholder="自动生成"
               [(ngModel)]="reporter.label" readonly   class=" form-control cursor_not_allowed"
               [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">组织：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText   class=" form-control cursor_not_allowed"
               placeholder="自动生成" [(ngModel)]="reporter.father" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">联系电话：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText   class=" form-control cursor_not_allowed"
               placeholder="自动生成" [(ngModel)]="reporter.remark" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">受理时间：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText  class=" form-control cursor_not_allowed"
               placeholder="自动生成" [(ngModel)]="dealTime" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">发生时间：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText  class=" form-control cursor_not_allowed"
               placeholder="自动生成" [(ngModel)]="occurTime" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">最终期限：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText placeholder="自动生成"
               class=" form-control cursor_not_allowed"
               [(ngModel)]="malDeadline" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">影响度：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText class=" form-control cursor_not_allowed"
               placeholder="自动生成" [(ngModel)]="malImpact" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">紧急度：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText class=" form-control cursor_not_allowed"
               placeholder="自动生成" [(ngModel)]="malUrgency" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">优先级：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText placeholder="自动生成" class=" form-control cursor_not_allowed"
               [(ngModel)]="malfPrority" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">故障级别：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText class=" form-control cursor_not_allowed"
               placeholder="自动生成" [(ngModel)]="malLevel" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">所属系统：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText  name="" placeholder="自动生成"
               [(ngModel)]="belongSystem.label" readonly class=" form-control cursor_not_allowed" [ngModelOptions]="{standalone: true}"/>
      </div>
      <label class="col-sm-1 control-label">发生地点：</label>
      <div class="col-sm-3 ui-fluid-no-padding">
        <input type="text" pInputText  name="department" placeholder="自动生成" class=" form-control cursor_not_allowed"
               [(ngModel)]="locationOccur.label" readonly [ngModelOptions]="{standalone: true}"/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">故障标题：</label>
      <div class="col-sm-11 ui-no-padding-left-15px ">
        <input type="text" pInputText  placeholder="自动生成" class=" form-control cursor_not_allowed"
               [(ngModel)]="malTitle" [ngModelOptions]="{standalone: true}" readonly/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">故障描述：</label>
      <div class="col-sm-11 ui-no-padding-left-15px ">
                 <textarea [rows]="5" pInputTextarea autoResize="autoResize"
                           class="form-control cursor_not_allowed"
                           [(ngModel)]="malDesc" [ngModelOptions]="{standalone: true}" readonly></textarea>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">上传附件：</label>
      <div class="col-sm-11 ui-fluid-no-padding ">
        <div *ngFor="let file of attachments">
          <app-upload-file-view [file]="file"></app-upload-file-view>
        </div>
        <!--<p-fileUpload name="file" url="{{ip}}/workflow/trouble/upload"-->
        <!--multiple="multiple"-->
        <!--accept="image/*,application/*,text/*"-->
        <!--chooseLabel="选择"-->
        <!--uploadLabel="上传"-->
        <!--cancelLabel="取消"-->
        <!--maxFileSize="3145728"-->
        <!--(onUpload)="onUpload($event)"-->
        <!--(onBeforeUpload)="onBeforeUpload($event)"-->
        <!--#form>-->
        <!--<ng-template pTemplate="content">-->
        <!--<ul *ngIf="uploadedFiles.length">-->
        <!--<li *ngFor="let file of uploadedFiles">{{file.name}} - {{file.size}} bytes</li>-->
        <!--</ul>-->
        <!--</ng-template>-->
        <!--</p-fileUpload>-->
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">关联服务目录：</label>
      <div class="col-sm-11 ui-no-padding-left-15px ui-fluid">
        <input type="text" pInputText  name="department" placeholder="自动生成"
               [(ngModel)]="relativeCategore.label" readonly class=" form-control cursor_not_allowed" [ngModelOptions]="{standalone: true}"/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">关联设备编号：</label>
      <div class="col-sm-11 ui-no-padding-left-15px ui-fluid">
        <input type="text" pInputText  name="department" placeholder="自动生成"
               [(ngModel)]="relativeEquip.label" readonly class=" form-control cursor_not_allowed"
               [ngModelOptions]="{standalone: true}"/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">分配至部门：</label>
      <div class="col-sm-5 ui-fluid-no-padding ">
        <input type="text" pInputText  name="department" placeholder="自动生成"
               [(ngModel)]="selectedDepartment.label" readonly class="form-control cursor_not_allowed"/>
      </div>
      <label class="col-sm-1 control-label">分配至个人：</label>
      <div class="col-sm-5 ui-fluid-no-padding ">
        <input type="text" pInputText  name="department" placeholder="自动生成"
               [(ngModel)]="malDepPerson" readonly class="form-control cursor_not_allowed"/>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-1 control-label">
        分配时间：
      </label>
      <div class="col-sm-5 ui-fluid-no-padding ui-fluid">
        <input type="text" pInputText  name="department" placeholder="自动生成"
               [(ngModel)]="selectedDepartment.label" readonly class="form-control cursor_not_allowed"/>
      </div>
      <label class="col-sm-1 control-label" >接收时间：</label>
      <div class="col-sm-5 ui-fluid-no-padding ui-fluid">
        <input type="text" pInputText  name="department" placeholder="自动生成"
               [(ngModel)]="malDepPerson" readonly class="cursor_not_allowed"/>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-12 ui-no-padding-left-15px ui-no-padding-right-15px">
        <button pButton type="button"  label="接受" [disabled]="hadSaved"
                [routerLink]="['/index/maintenance/malfunctionBase/malfunctionProcess', {id: sid, status: initStatus}]" class="pull-right ui-margin-right-10px"></button>
        <button pButton type="button" [routerLink]="['/index/maintenance/malfunctionBase']" label="拒绝" [disabled]="saved" class="pull-right ui-margin-right-10px"></button>
      </div>
    </div>
  </form>
  <p-dialog header="{{ dialogHeader }}" [(visible)]="departementDisplay" modal="modal" width="300" [responsive]="true">
    <p-tree [value]="filesTree4"
            selectionMode="{{ selectedMode }}"
            [(selection)]="selected"
            (onNodeExpand)="nodeExpand($event)"
            (onNodeSelect)="nodeSelect($event)"
    ></p-tree>
    <!--<div>Selected Nodes: <span *ngFor="let file of selected">{{file.label}} </span></div>-->
    <div style="margin-top:8px">Selected Node: {{selected ? selected.label : 'none'}}</div>
    <p-footer>
      <button type="button" pButton icon="fa-check" (click)="closeTreeDialog()" label="确定"></button>
      <button type="button" pButton icon="fa-close" (click)="departementDisplay=false" label="取消"></button>
    </p-footer>
  </p-dialog>
  <p-growl [(value)]="message"></p-growl>
</div>
